<script>
 export default {
    data(){
      return {
        active: 1
      }
    },
    methods:{
      changeActive(index){
        console.log(index);
      }
    }
 }
</script>

<template>
  <router-view></router-view>
  <van-tabbar @change="changeActive" v-model="active" active-color="#fc5051">
    <van-tabbar-item to="/" icon="wap-home-o">首页</van-tabbar-item>
    <van-tabbar-item to="/type" icon="apps-o">分类</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o">购物车</van-tabbar-item>
    <van-tabbar-item icon="user-o">我的</van-tabbar-item>
  </van-tabbar>
</template>

<style src="./style/app.scss"></style>
